package com.xiaolin.session.controller;

import com.xiaolin.session.model.Member;
import com.xiaolin.session.service.MemberService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.HashMap;
import java.util.List;
import java.util.Map;

/**
 * @ClassName MemberController
 * @Description TODO
 * @Detail detail
 * @Author MyPC
 * @Date 2020/9/30
 * @Version 1.0
 */
@RestController
@RequestMapping("/member")
public class MemberController {
    @Autowired
    MemberService memberService;

    @GetMapping("/list")
    public Map<String,Object> list(Map<String,String> params){
        List<Member> list = memberService.list(params);
        Map<String,Object> map=new HashMap<>();
        map.put("data",list);
        return map;
    }
}
